package bfunction

import (
    "gonaio_base/constant"
    "time"
)

func Time2String(data time.Time) string {
    if data.IsZero() {
        return ""
    }
    return data.Format(bconstant.DATE_TIME_STD)
}

func Time2StringX(data *time.Time) string {
    if data == nil || data.IsZero() {
        return ""
    }
    return data.Format(bconstant.DATE_TIME_STD)
}

func GetTimestamp() int64 {
    return time.Now().Unix()
}
